package some.member.profil.dao;

import java.util.List;
import java.util.Map;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Component;

import some.member.profil.domain.ProfilMemberCommand;
@Component
public class ProfilMemberDaoImpl extends SqlSessionDaoSupport implements ProfilMemberDao{

	@Override
	public void profilInsertMember(ProfilMemberCommand profilCommand) {
		getSqlSession().insert("someProfilDao.profilInsertMember",profilCommand);
	}

	@Override
	public ProfilMemberCommand getProfilMember(String id) {
		ProfilMemberCommand profil = getSqlSession().selectOne("someProfilDao.getProfilMember",id);
		return profil;
	}
	
	@Override
	public List<ProfilMemberCommand> getMemberList(Map<String, Object> map) {
		List<ProfilMemberCommand> list = getSqlSession().selectList("someProfilDao.getMemberList",map);
		return list;
	}

	@Override
	public int getMemberCount() {
		Integer count = getSqlSession().selectOne("someProfilDao.getMemberCount");
		return count;
	}

	@Override
	public void modifyProfil(ProfilMemberCommand profilCommand) {
		getSqlSession().update("someProfilDao.modifyProfil",profilCommand);
	}

	@Override
	public void deleteProfil(String id) {
		getSqlSession().delete("someProfilDao.deleteProfil",id);
		
	}
}
